package com.example.wangyuyuan.androidframe.mvp.ui;

import android.content.Context;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;

import com.example.wangyuyuan.androidframe.R;
import com.example.wangyuyuan.androidframe.mvp.base.BaseActivity;
import com.jaeger.library.StatusBarUtil;

import butterknife.BindView;

/**
 * Created by wangyuyuan on 2017/5/19.
 * 用户登陆注册的页面
 */

public class LoginAndRegisterActivity extends BaseActivity {

    @BindView(R.id.btnLogin)
    Button btnLogin;
    @BindView(R.id.btnRegister)
    Button btnRegister;

    @Override
    protected void processLogic() {

    }

    @Override
    protected void setListener() {
        btnLogin.setOnClickListener(this);
        btnRegister.setOnClickListener(this);

    }

    @Override
    protected void findViewById() {

    }

    @Override
    protected void loadViewLayout() {
        setContentView(R.layout.loginandregister_ac_layout);
//        动态设置状态栏的颜色
        StatusBarUtil.setColor(this, getResources().getColor(R.color.transparent), 10);
//        动态设置当前页面为 全屏模式
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }

    @Override
    protected Context getActivityContext() {
        return this;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btnLogin:
                jumpToActivityAndClearTask(LoginActivity.class);
                break;
            case R.id.btnRegister:
                jumpToActivityAndClearTask(RegisterActivity.class);
                break;
            default:
                break;
        }

    }
}
